package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2022/11/15 16:40
 */
@Controller
@ResponseBody
@RequestMapping("header")
public class RequestHeaderLimitController {

    // 既要有abc又要有def
    @RequestMapping(value = "limit",headers = {"abc","def"})
    public String headerLimit() {
        return "Header limit";
    }


    //Content-Type
    @RequestMapping(value = "consumes",consumes = "abc/def")
    public String contentTypeLimit() {
        return "content-type limit";
    }
    //Accept
    @RequestMapping(value = "produces",produces = "application/json;charset=utf-8")
    public String acceptLimit() {
        return "accept limit";
    }

}
